const moduleA = {
  // 模块化的state建议写成函数返回出去
  state: () => {
    return {
      userName: 'A'
    }
  },
  getters: {
    newName2 (state) {
      return state.userName + '!!!'
    }
  },
  mutations: {
    updateName (state) {
      state.userName = 'AAA'
    }
  },
  actions: {
    updateName (bxc) {
      console.log(bxc)
      setTimeout(() => {
        bxc.commit('updateName')
      }, 500)
    }
  }
}
export default moduleA
